package com.mxpio.webapp.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 服务器内存历史记录表
 *
 * @author: Cheng
 * @date: 2022/10/31
 */

@Entity
@Table(name = "MI_MONITOR_SERVER_MEMORY_HISTORY")
@ToString
@Data
@Schema(description = "服务器内存历史记录表")
public class MonitorServerMemoryHistory extends BaseEntity {

    @Id
    @Generator
    @Schema(description = "主键ID")
    @Column(name = "ID", length = 64)
    private String id;

    @Schema(description = "IP地址")
    @Column(name = "IP")
    private String ip;

    @Schema(description = "物理内存总量（单位：byte）")
    @Column(name = "MEM_TOTAL")
    private Long memTotal;

    @Schema(description = "物理内存使用量（单位：byte）")
    @Column(name = "MEM_USED")
    private Long memUsed;

    @Schema(description = "物理内存剩余量（单位：byte）")
    @Column(name = "MEM_FREE")
    private Long memFree;

    @Schema(description = "物理内存使用率")
    @Column(name = "MEN_USED_PERCENT")
    private Double menUsedPercent;

    @Schema(description = "交换区总量（单位：byte）")
    @Column(name = "SWAP_TOTAL")
    private Long swapTotal;

    @Schema(description = "交换区使用量（单位：byte）")
    @Column(name = "SWAP_USED")
    private Long swapUsed;

    @Schema(description = "交换区剩余量（单位：byte）")
    @Column(name = "SWAP_FREE")
    private Long swapFree;

    @Schema(description = "交换区使用率")
    @Column(name = "SWAP_USED_PERCENT")
    private Double swapUsedPercent;
}
